home *** CD-ROM | disk | FTP | other *** search
- BASIC INFORMATION
-
- Name: Selena Sol's Electronic Outlet (HTML Version)
- Version: 3.0
- Last Modified: 09-01-96
-
- DESCRIPTION
-
- This script and associated files allows one to sell one's inventory
- on the web. The interface is built primarily with HTML pages that are
- specifically formatted with script-understanbdable tags so that the script
- can keep track of users and their unique shopping carts.
-
- COPYRIGHT INFORMATION
-
- This application was written by Selena Sol (selena@eff.org,
- http://www.eff.org/~erict) having been inspired by countless other Perl
- authors. Feel free to copy, cite, reference, sample, borrow, resell or
- plagiarize the contents. However, if you don't mind, please let me know
- where it goes so that I can at least watch and take part in the
- development of the memes. Information wants to be free, support public
- domain freware. Donations are appreciated and will be spent on further
- upgrades and other public domain scripts.
-
- Finally, PLEASE SEND WORKING URL's to selena@eff.org. I maintain a list
- of implementations around the world.
-
- SUPPORT
-
- This script comes with no gaurentees or warranties. I am not a
- programming professional. I am a web-hobbiest and my scripts are
- continually evolving as I learn more. Don't expect the scripts to be
- perfect.
-
- Bug reports are greatly appreciated but installation support is
- extremely discouraged. I have attempted to include as much information as
- I could think of in this README and in the Customization and Installation
- FAQ available at http://www.eff.org/~erict/Scripts/. Please try ALL
- available sources of information BEFORE you email me. But if you must,
- make sure to include the following bits of information (I may not respond
- to your email if you do not answer ALL of the following questions):
-
- 1. What type of Web server are you running?
- 2. What type of Operating System is the Web server running on?
-
- 3. What is the "exact" error message from the Web?
- 4. What is the "exact" error message in your web server's error log?
- 5. What is the "exact" error message you receive when running the script
- from the command line.
-
- 6. Are you running this script on an ISP? If so, what is the email
- address of the Sysadmin there?
- 7. Are you using a virtual server setup? If so, what is the root path set
- in your Web server's environment?
-
- 8. In which directory is the Perl interpreter located?
- 9. In which directory is sendmail located (if you are using a script which
- demands use of sendmail)
-
- Again, I MAY NOT ANSWER YOUR QUESTION unless you have answered all nine of
- these questions.
-
- BASIC INSTALLATION (DOWNLOADING THE SCRIPT)
-
- It is recommended that you point your Web browser to "Selena Sol's Script
- Archive" to get the latest version of this script. The Script Archive is
- located at the following URL:
-
- http://www.eff.org/~erict/Scripts/
-
- From the "Script Archive" frontpage follow the hyperlinks to the detailed
- page dedicated to this script. Then click on the hyperlink "Download the
- scripts as a single tar file".
-
- BASIC INSTALLATION (UNARCHIVING THE APPLICATION)
-
- Once you have downloaded the TAR file (a single file containing all
- associated files in their relative positions under the root directory),
- transfer the TAR file to an executable directory on your web server and
- untar them. On UNIX systems, you may type the following at the
- command line:
-
- tar xvfp filename.tar
-
- (If you are using a non-UNIX Operating System, you may
- download a TAR/UNTAR program by pointing your Web browser
- to http://www.shareware.com).
-
- BASIC INSTALLATION (SETTING PERMISSIONS)
-
- Your Web server must have permission to read, write or execute as needed.
- Each sub-directory and file in the application has its own correct
- permissions level associated with it. Once you have unarchived (UNTAR)
- the application, you must then set the correct permissions. On UNIX
- systems, you will use the "chmod" command. The following table is a
- quick guide to setting permissions for UNIX servers.
-
- PERMISSION COMMAND
- rwxrwxrwx chmod 777 filename
- rwxrwxr-x chmod 775 filename
- rwxr-xr-x chmod 755 filename
- rw-rw-r-- chmod 664 filename
- rw-r--r-- chmod 644 filename
-
- Note: Not setting your permissions correctly is the
- NUMBER 1 reason why installations fail. Take time to
- get this right.
-
- The actual permissions required for the subdirectories and files used by
- this application are listed in the next section.
-
- BASIC INSTALLATION (FILES, DIRECTORIES, AND PERMISSIONS)
-
- The TAR file will then expand into a root directory called Html_web_store.
- Html_web_store will contain several sub-directories and several files.
- The diagram below depicts the directory structure as well as the
- permissions which must be applied to the files and subdirectories used by
- the application.
-
- Html_web_store Root Directory (drwxr-xr-x)
- |____Html Sub-directory (drwxr-xr-x)
- | |____frames.html (-rw-r--r--)
- | |____frontpage.html (-rw-r--r--)
- | |____number.html (-rw-r--r--)
- | |____outlet_frontpage.html (-rw-r--r--)
- | |____outlet_order_form.html (-rw-r--r--)
- | |____table_of_contents.html (-rw-r--r--)
- | |____vowel.html (-rw-r--r--)
- |____Library Sub-directory(drwxr-xr-x)
- | |____cgi-lib.pl (-rw-r--r--)
- | |____cgi-lib.sol (-rw-r--r--)
- | |____mail-lib.pl (-rw-r--r--)
- |____User_carts Sub-directory (drwxrwxrwx)
- | |____html_web_store.counter (-rw-rw-rw-)
- |____html_web_store.cgi (-rwxr-xr-x)
- |____html_web_store.setup (-rw-r--r--)
-
- Html_web_store - This is the application's root directory. The Web server
- must have read and execute privileges
-
-
- Html - This sub-directory is used to hold various HTML documents that are
- used by html_web_store.cgi to create some GUI elements. The
- subdirectory must be readable and executable by the web server and
- contains seven "Example" HTML files: frames.html, frontpage.html,
- number.html, outlet_frontpage.html, outlet_order_form.html,
- table_of_contents.html, and vowel.html. Each of these files
- must be readable by the web server.
-
- frames.html
- frontpage.html
- number.html
- outlet_frontpage.html
- outlet_order_form.html
- table_of_contents.html
- vowel.html
-
- Library - This sub-directory is used to hold the associated library files
- used by this application. The subdirectory must be readable and
- executable by the web server and contains nine library files
- which must all be readable by the web server: cgi-lib.pl,
- cgi-lib.sol, mail-lib.pl.
-
- Each library file is individually commented, so i will only give
- them cursory coverage here. cgi-lib.pl is used to read and parse
- incoming form data. cgi-lib.sol is used to manipulate counter
- files and create lock files when necessary. mail-lib.pl is used
- to send email to the store admin when orders are placed. You must
- define the local path of sendmail at line 42 of this library. If
- you are using an NT server and cannot use sendmail at all, you
- must replace this version with the SMTP version available at
- http://www.eff.org/~erict/Scripts/
-
- User_carts - This sub-directory is used to store the actual shopping carts
- used by people browsing your store. The subdirectory should be
- readable, writable and executable by the web server which will
- continually fill the sub directory up and prune it automatically
- in the course of usage. Initially, this directory will contain
- only web_store.counter which should be readable and writable by
- the web server.
-
- html_web_store.counter is the counter file which will be used to assign
- unique shopping cart id numbers for items within client's carts.
- Initially, this file should simply have a one as the only line in
- the file. the script will automatically increment this as needed.
-
- html_web_store.cgi - is the main script whjich generates the GUI for the
- online store. it must be readable and executable by the web
- server.
-
- html_web_store.setup - is a file which contains server specific options
- and variables which must be defined for html_web_store.cgi to run.
- It must be readable by the web server.
-
- BASIC INSTALLATION (SETUP FILES - HTML_WEB_STORE.SETUP)
-
- $counter_file is the location of the counterfile used to assign unique
- numbers to every item added to the shopping cart.
- $main_script is the local path of html_web_store.cgi
- $main_script_url is the URL of html_web_store.cgi
- $data_directory is the local path of the Databases directory.
- $order_form is the name of the HTML order form that you will use when
- someone is ready to place their order.
- $admin_email is the email addres of the person who should receive the
- order submitted.
- $email_subject is the subject of the email regarding an order
- $cart_directory is the directory where all of the user shopping carts
- will be stored. The script will create the files on its own. You
- need only make the directory readable, writable and executable by
- the web server.
- $html_directory is the root of your HTML documents. In the
- distribution, all HTML are contained in a subdirectory of this
- one...but it does not matter where your HTML is so long as you
- include the entire path.
- $cgi_lib_pl is the location of cgi_lib_pl
- $cgi_lib_sol is the location of cgi_lib_sol
- $mail-lib.pl is the location of mail-lib.pl
- $frontpage_file is the location of the very first HTML page that you
- want displayed when a new client enters the store.
- @display_fileds is the array containing all the shopping cart database
- fields that you want displayed when the user hits the view/modify
- button.
- @display_numbers are the corresponding array numbers of those within the
- array (Remember that array counting starts at 0 not 1)
- $price_number is specifically the array number of price. We need to be
- able to identify this in order to make price calculations.
- @email_numbers are the array elements that you want sent in the email to
- the admin so that she knows what items have been ordered.
- %order_form_array is the associative array containing the variable names
- ans their associated Display Names. Note, the preceeding numbers (ie
- 01-, 02-, 03-) are used to "force" an order. because associative
- arrays use hash tables, the order cannot be determined unless you
- sort them with numbers as shown here. This is not mandatory, but
- good naming of variables will make the display nicer on the
- screen.
-
- RUNNING THE SCRIPT
-
- This script should be run by pointing your browser to html_web_store.cgi.
- For example, you might use a URL such as:
-
- http://www.foobar.com/cgi-bin/Html_web_store/html_web_store.cgi
-